<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <!-- Your app title -->
    <title>My App</title>
    <!-- Path to Framework7 Library CSS, iOS Theme -->
    <link rel="stylesheet" href="dist/css/framework7.ios.min.css">
    <!-- Path to Framework7 color related styles, iOS Theme -->
    <link rel="stylesheet" href="dist/css/framework7.ios.colors.min.css">
    <!-- Path to your custom app styles-->
    <link rel="stylesheet" href="dist/css/my-app.css">
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
</head>
<body>
<script>
    wx.config({
        debug : false,//这里是开启测试，如果设置为true，则打开每个步骤，都会有提示，是否成功或者失败
        appId : '${appid}',
        timestamp : '${timestamp}',
        nonceStr : '${nonceStr}',
        signature : '${signature}',
        jsApiList : [
            // 所有要调用的 API 都要加到这个列表中
            'onMenuShareTimeline',"onMenuShareAppMessage","onMenuShareQQ","hideMenuItems"]
    });

    var strTiele="";
    var strDesc="";
    var strLink="url";
    var strImgUrl="图片路径";
    wx.ready(function() {
        // 1 判断当前版本是否支持指定 JS 接口，支持批量判断
        wx.checkJsApi({
            jsApiList : ['"hideMenuItems"','onMenuShareTimeline','onMenuShareAppMessage',"onMenuShareQQ"],

        });

        //隐藏QQ空间分享,QQ浏览器，safari
        wx.hideMenuItems({
            menuList: ["menuItem:share:QZone","menuItem:openWithSafari","menuItem:openWithQQBrowser"]
        });

        //分享朋友圈
        wx.onMenuShareTimeline({
            title : strTiele, // 分享标题
            desc : strDesc,//分享描述
            link : strLink, // 分享链接
            imgUrl: strImgUrl,// 分享图标

        });

        //分享给微信好友
        wx.onMenuShareAppMessage({
            title : strTiele, // 分享标题
            desc : strDesc,//分享描述
            link : strLink, // 分享链接
            imgUrl: strImgUrl,// 分享图标
        });

        //分享到QQ
        wx.onMenuShareQQ({
            title : strTiele, // 分享标题
            desc : strDesc,//分享描述
            link : strLink, // 分享链接
            imgUrl: strImgUrl,// 分享图标
        });
</script>
</body>
</html>